-module('ex_7.13_flow_sequence').

-include_lib("eunit/include/eunit.hrl").

-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").

single_test_() ->
    ?_assertMatch(
      {yamerl_parser,
        {file,?FILENAME},
        [],
        <<>>,
        32,
        true,
        [],
        0,
        33,
        3,
        1,
        false,
        2,
        16,
        utf8,
        false,
        undefined,
        _,
        _,
        [],
        {bcoll,root,0,-1,1,1,-1,1,1},
        false,
        false,
        false,
        [{impl_key,false,false,undefined,undefined,1,1}],
        false,
        false,
        _,
        [],
        0,
        21,
        20,
        undefined,
        undefined,
        _,
        false,
        [],
        [
          {yamerl_stream_end,2,16},
          {yamerl_doc_end,2,16},
          {yamerl_collection_end,2,16,block,sequence},
          {yamerl_collection_end,2,15,flow,sequence},
          {yamerl_scalar,2,11,
            {yamerl_tag,2,11,{non_specific,"?"}},
            flow,plain,"four"},
          {yamerl_sequence_entry,2,11},
          {yamerl_scalar,2,4,
            {yamerl_tag,2,4,{non_specific,"?"}},
            flow,plain,"three"},
          {yamerl_sequence_entry,2,4},
          {yamerl_collection_start,2,3,
            {yamerl_tag,2,3,{non_specific,"?"}},
            flow,sequence},
          {yamerl_sequence_entry,2,1},
          {yamerl_collection_end,1,15,flow,sequence},
          {yamerl_scalar,1,10,
            {yamerl_tag,1,10,{non_specific,"?"}},
            flow,plain,"two"},
          {yamerl_sequence_entry,1,10},
          {yamerl_scalar,1,5,
            {yamerl_tag,1,5,{non_specific,"?"}},
            flow,plain,"one"},
          {yamerl_sequence_entry,1,5},
          {yamerl_collection_start,1,3,
            {yamerl_tag,1,3,{non_specific,"?"}},
            flow,sequence},
          {yamerl_sequence_entry,1,1},
          {yamerl_collection_start,1,1,
            {yamerl_tag,1,1,{non_specific,"?"}},
            block,sequence},
          {yamerl_doc_start,1,1,{1,2},_},
          {yamerl_stream_start,1,1,utf8}
        ]
      },
      yamerl_parser:file(?FILENAME)
    ).
